package com.dys.controller;

import com.dys.pojo.Person3;
import com.dys.pojo.Person4;
import com.dys.pojo.Person5;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @className: com.dys.controller.ReceiveListController
 * @description: com.dys.controller
 * @author: pine cone
 * @version: v1.0.0
 * @createTime: 2024/10/26 18:52
 */
@Controller
public class ReceiveListController {

    @RequestMapping(value = {"/pojoTypeParamByList.do"})
    public String pojoTypeParamByList(Person3 person3) {
        System.out.println("Spring MVC 接收List类型的参数......");
        System.out.println(person3);
        return "receiveListSuccess";
    }

    @RequestMapping(value = {"/pojoTypeParamByPojo.do"})
    public String pojoTypeParamByPojo(Person4 person) {
        System.out.println("Spring MVC 接收POJO类型的POJO参数......");
        System.out.println(person);
        return "receiveListSuccess";
    }

    @RequestMapping(value = {"/pojoTypeParamByMap.do"}, method = RequestMethod.POST)
    public String pojoTypeParamByMap(Person5 person) {
        System.out.println("Spring MVC 接收POJO类型的Map参数......");
        System.out.println(person);
        return "receiveListSuccess";
    }
}
